package com.adeoservices.gwt.dispatch.spring.server.security;

import net.customware.gwt.dispatch.server.ExecutionContext;
import net.customware.gwt.dispatch.shared.ActionException;

import org.springframework.stereotype.Component;

import com.adeoservices.gwt.dispatch.spring.server.handler.SpringActionHandler;

@Component
@Permission(verifier = PositivePermissionVerifier.class)
public class ActionHandlerAuthorized extends
		SpringActionHandler<ActionAuthorized, ResultAuthorized> {
	// @Autowired
	// public TestActionHandler(ActionHandlerRegistry registry)
	// {
	// super(registry);
	// }

	@Override
	public ResultAuthorized execute(ActionAuthorized action, ExecutionContext context)
			throws ActionException {

		System.out.println("dans test machin");
		return new ResultAuthorized();
	}

	@Override
	public Class<ActionAuthorized> getActionType() {
		return ActionAuthorized.class;
	}

	@Override
	public void rollback(ActionAuthorized action, ResultAuthorized result,
			ExecutionContext context) throws ActionException {
	}
}
